package com.jh.paymentchannel.helipay.service;

import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.jnewsdk.util.StringUtils;
@Controller
@EnableAutoConfiguration
public class HeLiInfoPage {
	 
	private static final Logger LOG = LoggerFactory.getLogger(HeLiInfoPage.class);
	
	
	@RequestMapping(method=RequestMethod.GET,value="/v1.0/paymentchannel/topup/heli")
	public  String returnpay(HttpServletRequest request, HttpServletResponse response, Model model)throws IOException {
		
		Map map = new HashMap();
		// 设置编码
		request.setCharacterEncoding("utf-8");
		response.setCharacterEncoding("utf-8");
		response.setContentType("text/html;charset=utf-8");
		String P1_bizType = request.getParameter("P1_bizType");
		String P2_customerNumber = request.getParameter("P2_customerNumber");
		String P3_userId = request.getParameter("P3_userId");
		String P4_orderId = request.getParameter("P4_orderId");
		String P5_timestamp = request.getParameter("P5_timestamp");
		String P6_payerName = request.getParameter("P6_payerName");
		String P7_idCardType = request.getParameter("P7_idCardType");
		String P8_idCardNo = request.getParameter("P8_idCardNo");
		String P9_cardNo = request.getParameter("P9_cardNo");
		String P10_year = request.getParameter("P10_year");
		String P11_month = request.getParameter("P11_month");
		String P12_cvv2 = request.getParameter("P12_cvv2");
		String P13_phone = request.getParameter("P13_phone");
		String bankName = request.getParameter("bankName");
		String loginPhone = request.getParameter("loginPhone");
		LOG.info("接口/v1.0/paymentchannel/topup/kuaijie——@P1_bizType="+P1_bizType+"@P2_customerNumber="+P2_customerNumber+"@P3_userId="+P3_userId+"@P4_orderId="+P4_orderId
				+"@P5_timestamp="+P5_timestamp+"@P6_payerName="+P6_payerName+"@P7_idCardType="+P7_idCardType+"@P8_idCardNo="+P8_idCardNo
				+"@P9_cardNo="+P9_cardNo+"@P10_year="+P10_year+"@P11_month="+P11_month+"@P12_cvv2="+P12_cvv2+"@P13_phone="+P13_phone+"@bankName="+bankName);
			model.addAttribute("P1_bizType", P1_bizType);
			model.addAttribute("P2_customerNumber",P2_customerNumber);
			model.addAttribute("P3_userId", P3_userId);
			model.addAttribute("P4_orderId", P4_orderId);
			model.addAttribute("P5_timestamp", P5_timestamp);
			model.addAttribute("P6_payerName", P6_payerName);
			model.addAttribute("P7_idCardType", P7_idCardType);
			model.addAttribute("P8_idCardNo", P8_idCardNo);
			model.addAttribute("P9_cardNo", P9_cardNo);
			model.addAttribute("P10_year", P10_year);
			model.addAttribute("P11_month", P11_month);
			model.addAttribute("P12_cvv2", P12_cvv2);
			model.addAttribute("P13_phone", P13_phone);
			model.addAttribute("bankName", bankName);
			model.addAttribute("loginPhone", loginPhone);
			model.addAttribute("orderIp", request.getLocalAddr());
			return "bangka";
		
	}
	
}
